<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="../common/common.jspf"%>
<script type="text/javascript" src="${ctx}/js/promotion/edit.js"></script>

<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/promotion/savePro">
		<input type="hidden" value="${promotion.id}" name="id" id="id">
		<section class="panel panel-default">
		<div class="panel-body">
			<div class="form-group">
				<label class="col-sm-2 control-label">促销类型</label>
				<div class="col-sm-4">
					<select class="form-control" name=proType id="unit">
						<option value="">请选择</option>
						<%-- <c:forEach var="item" items="${goodsUnitList}"> --%>
							<%-- <option value="${item.id}" <c:if test="${item.id==goods.unit}">selected</c:if>>${item.name}</option> --%>
						<%-- </c:forEach> --%>
						<option value="0" <c:if test="${promotion.proType=='0'}">selected</c:if>>订单满减</option>
						<option value="1" <c:if test="${promotion.proType=='1'}">selected</c:if>>商品满减</option>
						<option value="2" <c:if test="${promotion.proType=='2'}">selected</c:if>>商品满赠</option>
						<option value="3" <c:if test="${promotion.proType=='3'}">selected</c:if>>商品打折</option>
					</select>
				</div>
				<label class="col-sm-2 control-label">促销名称 </label>
				<div class="col-sm-4">
					<input type="text" class="form-control" placeholder="请输入促销名称" value="${promotion.proTitle}" name="proTitle" id="proTitle" maxlength="32">
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label">促销开始时间</label>
				<div class="col-sm-4">
					<input type="text" class="form-control" placeholder="请选择促销开始时间" value="<fmt:formatDate value="${promotion.proStart}" type="date" pattern="yyyy-MM-dd HH:mm:ss"/>" name="proStart" id="proStart" maxlength="40">
				</div>
				<label class="col-sm-2 control-label">促销结束时间</label>
				<div class="col-sm-4">
					<input type="text" class="form-control" placeholder="请选择促销结束时间" value="<fmt:formatDate value="${promotion.proEnd}" type="date" pattern="yyyy-MM-dd HH:mm:ss"/>" name="proEnd" id="proEnd" maxlength="30">
				</div>
			</div>
		</div>
		<footer class="panel-footer text-right bg-light lter">
			<button type="submit" class="btn btn-success btn-s-xs">保存</button>
		</footer> </section>
	</form>
	<script type="text/javascript">
		onloadurl();
	</script>
</body>
</html>